﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Controller;

namespace Facade
{
    public class DepartmentFacade
    {
        public string Save(Department Departments)
        {
            DepartmentController cont = new DepartmentController();
            return cont.Save(Departments);
        }

        public string Delete(Department Departments)
        {
            DepartmentController cont = new DepartmentController();
            return cont.Delete(Departments);
        }

        public string BeforeDelete(Department Departments)
        {
            DepartmentController cont = new DepartmentController();
            return cont.BeforeDelete(Departments);
        }

        public IList<Department> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData, int BusinessGroupID)
        {
            IList<Department> Departments = new List<Department>();
            DepartmentController cont = new DepartmentController();
            Departments = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData, BusinessGroupID);
            return Departments;
        }

        public Department GetDepartmentByID(int ID)
        {
            Department departments = new Department();
            DepartmentController cont = new DepartmentController();
            departments = cont.GetDepartmentByID(ID);
            return departments;
        }

        public Department GetDepartmentByDescription(string DepartmentDescription)
        {
            Department departments = new Department();
            DepartmentController cont = new DepartmentController();
            departments = cont.GetDepartmentByDescription(DepartmentDescription);
            return departments;
        }
    }
}